Skip to content

Introduce NUT "authconf" file support [#3329, #3411]#3435

Open
jimklimov wants to merge 108 commits into
networkupstools:masterfrom
jimklimov:issue-3329
Open

Introduce NUT "authconf" file support [#3329, #3411]#3435
jimklimov wants to merge 108 commits into
networkupstools:masterfrom
jimklimov:issue-3329

Conversation

@jimklimov

@jimklimov jimklimov commented May 11, 2026

Copy link
Copy Markdown
Member

Starting with a PoC from AI, slightly modified (20%?) in review, following the spec requested in the GitHub issue #3329, as a stepping stone for further work. Also address parts of issue #3411.

Closes: #3503

Let CI loose on this iteration that passes locally...

TODO:

UPDATE: During work on this, it was found that NSS CERTHOST support was actually broken, and only worked for certificates whose nicknames matched the host name, not the "My nut server" nickname as the example claimed for years. Fixed now.

UPDATE: During work on this, it was found that it may be troublesome for a single client to connect to multiple NUT data servers which would require different CA trust stores and/or client self-identification by certificates. To be investigated under #3494, not in scope here.

@jimklimov jimklimov added this to the 2.8.6 milestone May 11, 2026
@jimklimov jimklimov added enhancement SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters AI For good or bad, machine tools are upon us. Humans are still the responsible ones. labels May 11, 2026
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit cb172e1 is temporarily available: NUT-tarballs-PR-3435.zip.

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4693-master completed (commit 049a4d4c36 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4694-master completed (commit c8f40b4384 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4696-master completed (commit 25660e3752 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4697-master completed (commit 9be8443368 by @jimklimov)

Comment thread clients/authconf.c Fixed
Comment thread clients/authconf.c Fixed
Comment thread tests/test_authconf.c Fixed
Comment thread tests/test_authconf.c Fixed
Comment thread tests/test_authconf.c Fixed
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Comment thread clients/authconf.c Dismissed
Comment thread clients/authconf.c Fixed
Comment thread clients/authconf.c Fixed
@jimklimov jimklimov force-pushed the issue-3329 branch 2 times, most recently from 73a7249 to ed6f549 Compare May 12, 2026 14:05
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4700-master completed (commit 8a8a16fc63 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4701-master completed (commit 40e1ff94b4 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Comment thread clients/authconf.c Fixed
jimklimov added 13 commits June 24, 2026 20:00
…t-ness of freed strings [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…for SSL-capable builds [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ng for WIN32 runs [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ll back to dereferencing symlinks if `cp -prf` failed [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d files right away [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… into prepare_NIT_certs() where we would inevitably use them [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…LIENT_CERTIDENT ...` if `WITH_SSL_CLIENT != none` [networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…d num_sections) [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…is ignored [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Comment thread tests/test_authconf.c Dismissed
Comment thread tests/test_authconf.c Dismissed
Comment thread clients/upsclient.c Dismissed
Comment thread tests/test_authconf.c Dismissed
Comment thread tests/test_authconf.c
upscli_dump_authconf_item(NULL, ac, 1, 1);
return 1;
}
/* FIXME: Find a host_cert for the bracketed IPv6 address, make sure it is the same as the one in the section */
Comment thread tests/test_authconf.c
Comment on lines +481 to +482
/* FIXME: Find a host_port_cert for the bracketed IPv6 address, make sure it is the same
* as the one in the section, and there are no hits for any other ports */
Comment thread tests/test_authconf.c Dismissed
Comment thread tests/test_authconf.c Dismissed
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4874-master completed (commit b0d8a29031 by @jimklimov)

@AppVeyorBot

Copy link
Copy Markdown

jimklimov added 10 commits June 24, 2026 22:06
…odule/PyNUT.py.in: add ability to parse nutauth.conf files [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
….conf files [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…m, scripts/python/module/PyNUT.py.in: revise ability to parse nutauth.conf files [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…hout connecting right away; remember requested TRACKING option to apply whenever we do connect() [networkupstools#3329, networkupstools#1711]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ule/PyNUT.py.in: revise normalization of host strings that look like numeric IPv6 [networkupstools#3503]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ame that starts with "@" [networkupstools#3329]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… splitting of host:port strings where host looks like numeric IPv6 [networkupstools#3503]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
Comment thread clients/nutclient.cpp Dismissed
Comment thread clients/nutclient.cpp
{
}

AuthConf::AuthConf(const AuthConf& source, const std::string& section_name)
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI For good or bad, machine tools are upon us. Humans are still the responsible ones. enhancement SSL/NSS Issues and PRs about SSL, TLS and other crypto-related matters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NUT authconf: make sure bracketed IPv6 addresses are parsed properly

3 participants